
//对外公开的方法
module.exports.postData = postData;

//远程调用
function postData(remote_api_url, remote_data, cb) {
  
  wx.request({
    url: remote_api_url,
    data: remote_data,
    method: "POST",
    header: {
      'content-type': 'application/x-www-form-urlencoded'
    },
    success: function (res) {
      if (cb && typeof cb == "function") {
        cb(res)
      }
    },
  });
}
